<template>
  <div>
    <Header_h />
    <div class="sq_box_content">
      <bannerInfo :info="info" />
    </div>
    <div class="new_box">
      <div class="container">
        <div class="s_flex s_align_items_start">
          <leftMenu
            v-if="list.type == 1"
            :menu="menu"
            :check="active"
            @checkItem="checkItem"
          />
          <leftMenu
            v-if="list.type == 2"
            :menu="menu2"
            :check="active"
            @checkItem="checkItem"
          />
          <leftMenu
            v-if="list.type == 3"
            :menu="menu3"
            :check="active"
            @checkItem="checkItem"
          />
          <section class="core_content_left core_content">
            <div class="leader_infos">
              <div class="leader_heads listshow1" v-if="list.type == 1">
                <div class="sq_tilte_color ft_weight_800">
                  <div class="s_flex s_align_items_center">
                    <span class="r_line"></span>
                    <h3>概述:</h3>
                  </div>
                </div>
                <div
                  class="sq_html sq_content line_h_26 sq_content_color"
                  v-html="list.patent_desc"
                ></div>
              </div>
              <div class="leader_heads listshow2" v-if="list.type == 1">
                <div class="sq_tilte_color ft_weight_800">
                  <div class="s_flex s_align_items_center">
                    <span class="r_line"></span>
                    <h3>专利申请:</h3>
                  </div>
                </div>
                <div
                  class="sq_html sq_content line_h_26 sq_content_color"
                  v-html="list.patent_apply"
                ></div>
              </div>
              <div class="leader_heads listshow3" v-if="list.type == 1">
                <div class="sq_tilte_color ft_weight_800">
                  <div class="s_flex s_align_items_center">
                    <span class="r_line"></span>
                    <h3>专利异议:</h3>
                  </div>
                </div>
                <div
                  class="sq_html sq_content line_h_26 sq_content_color"
                  v-html="list.patent_objection"
                ></div>
              </div>
              <!-- <div class="leader_heads" v-if="list.type == 1">
                <div class="sq_tilte_color ft_weight_800">
                  <div class="s_flex s_align_items_center">
                    <span class="r_line"></span>
                    <h3>诉讼:</h3>
                  </div>
                </div>
                <div
                  class="sq_html sq_content line_h_26 sq_content_color"
                  v-html="list.patent_litigation"
                ></div>
              </div> -->

              <div class="leader_heads listshow1" v-if="list.type == 2">
                <div class="sq_tilte_color ft_weight_800">
                  <div class="s_flex s_align_items_center">
                    <span class="r_line"></span>
                    <h3>商标申请 :</h3>
                  </div>
                </div>
                <div
                  class="sq_html sq_content line_h_26 sq_content_color"
                  v-html="list.trademark_apply"
                ></div>
              </div>

              <div class="leader_heads listshow2" v-if="list.type == 2">
                <div class="sq_tilte_color ft_weight_800">
                  <div class="s_flex s_align_items_center">
                    <span class="r_line"></span>
                    <h3>商标诉讼:</h3>
                  </div>
                </div>
                <div
                  class="sq_html sq_content line_h_26 sq_content_color"
                  v-html="list.trademark_litigation"
                ></div>
              </div>

              <div class="leader_heads listshow3" v-if="list.type == 2">
                <div class="sq_tilte_color ft_weight_800">
                  <div class="s_flex s_align_items_center">
                    <span class="r_line"></span>
                    <h3>商标异议:</h3>
                  </div>
                </div>
                <div
                  class="sq_html sq_content line_h_26 sq_content_color"
                  v-html="list.trademark_objection"
                ></div>
              </div>

              <div class="leader_heads 1" v-if="list.type == 3">
                <div class="sq_tilte_color ft_weight_800">
                  <div class="s_flex s_align_items_center">
                    <span class="r_line"></span>
                    <h3>警告函正文:</h3>
                  </div>
                </div>
                <div
                  class="sq_html sq_content line_h_26 sq_content_color"
                  v-html="list.content"
                ></div>
              </div>
            </div>
          </section>
        </div>
      </div>
    </div>
    <Footer />
    <rightMenu @moveTo="moveTo" />
  </div>
</template>

<script>
import Header_h from "@/components/Header_h";
import Footer from "@/components/Footer";
import bannerInfo from "@/components/web/bannerInfo";
import leftMenu from "@/components/web/leftMenu";
import { lawInfo } from "@/api/web";
import rightMenu from "@/components/web/rightMenu";

export default {
  components: {
    Header_h,
    Footer,
    bannerInfo,
    leftMenu,
    rightMenu,
  },
  data() {
    return {
      info: {
        title: `${this.$route.query.name}专利申请及诉讼指引`,
        content: "最新的专利申请及诉讼指引",
        img: require("@/assets/web/banner.png"),
      },
      check: -1,
      active: 0,
      menu: [
        {
          name: "概述",
        },
        {
          name: "专利申请",
        },
        {
          name: "专利异议",
        },
      ],
      menu2: [
        {
          name: "商标申请",
        },
        {
          name: "	商标诉讼",
        },
        {
          name: "	商标异议",
        },
      ],
      menu3: [
        {
          name: "	警告函正文",
        },
      ],
      value: "",
      list: [],
    };
  },
  mounted() {
    this.getList();
  },
  methods: {
    moveTo() {
      window.scrollTo(0, 0);
    },
    async getList() {
      try {
        this.list = await lawInfo({
          country: this.$route.query.id,
          type: this.$route.query.types,
        });
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    checkItem(index) {
      this.active = index;
      this.showDetails();
    },
    showDetails() {
      var el = document.getElementsByClassName(`listshow${this.active + 1}`)[0];
      // console.log(el.offsetTop);
      this.$nextTick(function () {
        window.scrollTo({ behavior: "smooth", top: el.offsetTop });
      });
    },
  },
};
</script>

<style lang="less" scoped>
.new_box {
  margin-top: -4%;
  position: relative;
  z-index: 1;
  margin-bottom: 60px;
}
.core_content .h_item_list_img {
  width: 144px;
  height: 144px;
  -o-object-fit: contain;
  object-fit: contain;
  overflow: hidden;
  background: #f6f6f6;
  text-align: center;
  .h_img_wap {
    padding-bottom: 0;
    width: 100%;
    height: 100%;
    // position: relative;
    img {
      width: 100%;
      height: 100%;
      -webkit-transition: all 0.5s ease;
      transition: all 0.5s ease;
      padding: 15px;
      -o-object-fit: contain;
      object-fit: contain;
    }
  }
}

.li_active {
  width: 100%;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(24, 76, 171, 0.16);
  border: none;
}

.right_info {
  width: 70%;
  margin-left: 25px;
}

.core_content .item_list {
  padding: 23px 30px;
  width: 100%;
  margin-bottom: 30px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.content_spacing {
  margin: 22px auto 25px;
}
.core_content_left {
  width: 80%;
  margin-left: 250px;
  background-color: #fff;
  height: 100%;
  box-shadow: 0px 0px 21px 0px rgba(97, 97, 102, 0.23);
  //   padding: 30px 0;
  // margin-bottom:25px;
}
.core_content_right {
  width: 25%;
  background-color: #fff;
}
.content_right_spacing {
  margin: 10px 0;
}
.list_right {
  border-top: 1px solid #eee;
  padding: 10px 0;
  margin: 0 10px;
}
.right_title {
  margin: 0 10px;
  padding: 10px 0;
}

.sq_h3 {
  margin-bottom: 30px;
}

.sq_html {
  border-top: 1px solid var(--color9);
  // border-bottom: 1px solid var(--color9);
  padding: 30px 0;
  margin-top: 25px;
  /deep/ img {
    max-width: 100%;
    margin: 0 auto;
  }
}

.new_footer {
  margin-top: 45px;
  div:hover {
    color: var(--color);
    cursor: pointer;
  }
  .iconfont {
    font-size: 12px;
  }
}
.new_box {
  margin-top: -4%;
  position: relative;
  z-index: 1;
  margin-bottom: 60px;
}
.core_content .item_list_img {
  width: 144px;
  height: 144px;
  object-fit: contain;
  overflow: hidden;
  background: #f6f6f6;
  text-align: center;
  .img_wap {
    padding-bottom: 0;
    width: 100%;
    height: 100%;
    // position: relative;
    img {
      width: 100%;
      transition: all 0.5s ease;
      padding: 15px;
      object-fit: contain;
      &:hover {
        transform: scale(1.1);
      }
    }
  }
}

.li_active {
  width: 100%;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(24, 76, 171, 0.16);
  border: none;
}

.right_info {
  width: 82%;
  // margin-left: 25px;
}

.core_content .item_list {
  padding: 23px 30px;
  width: 95%;
  margin: 0 auto;
  // margin-bottom: 30px;
  background: #ffffff;
  // border: 1px solid #ced4ea;
  // border-bottom: 1px solid var(--color9);
  cursor: pointer;
  transition: all 0.2s ease;
  &:last-child {
    border-bottom: 0;
  }
  // &:hover {
  //   background: #f7f9fc;
  // }
}

.core_content .item_list:last-child {
  margin-bottom: 0;
}

.content_spacing {
  margin: 10px auto;
}
.core_content_left {
  width: 100%;
  // margin-left: 60px;
  background-color: #fff;
  height: 100%;
  box-shadow: 0 0 16px rgba(24, 76, 171, 0.16);
}
.core_content_right {
  width: 25%;
  background-color: #fff;
}
.content_right_spacing {
  margin: 10px 0;
}
.list_right {
  // border-top: 1px solid #eee;
  padding: 10px 0;
  margin: 0 10px;
}
.right_title {
  margin: 0 10px;
  padding: 10px 0;
}
.tag_right {
  margin-right: 15px;
}
.pantent {
  margin-top: 10px;
  p {
    margin-right: 20px;
  }
}

.number {
  margin-bottom: 10px;
  .cril {
    width: 13px;
    height: 13px;
    background: #3377ff;
    border-radius: 50%;
    display: inline-block;
  }
}
.select_box {
  padding: 30px;
  .select_item {
    margin-right: 45px;
  }
}
.leader_box {
  margin-top: 20px;
  p {
    margin-bottom: 10px;
  }
}
.leader_infos {
  margin-top: 50px;
  .r_line {
    width: 5px;
    height: 16px;
    line-height: 30px;
    background: #ca0010;
    box-shadow: 1px 2px 4px 0px rgba(251, 79, 79, 0.35);
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
  }
}
.core_content .item_list {
  padding: 23px 30px;
  width: 100%;
  // margin: 0 auto 30px;
  // margin-bottom: 30px;
  background: #ffffff;
  // border: 1px solid #ced4ea;
  cursor: pointer;
  transition: all 0.2s ease;
  &:hover {
    background: #f7f9fc;
  }
}

.core_content .item_list:last-child {
  margin-bottom: 0;
}

.list_right {
  // border-top: 1px solid #eee;
  padding: 10px 0;
  margin: 0 10px;
}
.right_title {
  margin: 0 10px;
  padding: 10px 0;
}
.tag_right {
  margin-right: 20px;
}
.pantent {
  margin-top: 10px;
  p {
    margin-right: 20px;
  }
}

.number {
  margin-bottom: 10px;
  .cril {
    width: 13px;
    height: 13px;
    background: #3377ff;
    border-radius: 50%;
    display: inline-block;
  }
}
.select_box {
  padding: 30px;
  .select_item {
    margin-right: 45px;
  }
}

.core_content .item_list_img {
  width: 188px;
  height: 237px;
  object-fit: contain;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e6e9f0;
  border-radius: 5px;
  text-align: center;
  .img_wap {
    padding-bottom: 0;
    width: 100%;
    height: 100%;
    // position: relative;
    img {
      width: 100%;
      transition: all 0.5s ease;
      padding: 15px;
      object-fit: contain;
      &:hover {
        transform: scale(1.1);
      }
    }
  }
}

.leader_heads {
  padding: 0 30px;
}
</style>